using System;
using System.Collections.Generic;
using System.Text;

namespace Jalal.Library.Utility
{
    public enum ActionResultType
    {
        Succeed = 1,
        Failed = 2,
        InvalidOperation = 3,
        Error = 4
    }

    public class ActionResult<TGenericType>
    {
        private ActionResultType _resultType;
        private string _message;
        private TGenericType _returnData;

        public ActionResultType ResultType
        {
            get { return _resultType; }
            set { _resultType = value; }
        }

        public string Message
        {
            get { return _message; }
            set { _message = value; }
        }

        public TGenericType ReturnData
        {
            get { return _returnData; }
            set { _returnData = value; }
        }

        public ActionResult() { }

        public ActionResult(ActionResultType resultType, string message, TGenericType returnData)
        {
            _resultType = resultType;
            _message = message;
            _returnData = returnData;
        }
    }
}